﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Prism.Games.GalEngine.Scripts.FunctionModel
{
    /// <summary>
    /// 可被新增标记以及支持属性更变通知的基类。
    /// </summary>
    [Serializable]
    public abstract class MarkedObject : Prism.ComponentModel.NotifyPropertyChangedBase, IId
    {
        private int id;
        public int Id
        {
            get
            {
                return this.id;
            }
            set
            {
                if (value != this.id)
                {
                    this.id = value;
                    this.OnPropertyChanged("Id");
                }
            }
        }

        private string name = "";

        public string Name
        {
            get { return name; }
            set
            {
                if (name != value)
                {
                    name = value;
                    this.OnPropertyChanged("Name");
                }
            }
        }
    }
}
